home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / glibc-1.09 / glibc-1 / glibc-1.09.1 / gnu-stabs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-18  |  2.5 KB  |  74 lines

  1. /* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3.  
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public License as
  6. published by the Free Software Foundation; either version 2 of the
  7. License, or (at your option) any later version.
  8.  
  9. The GNU C Library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12. Library General Public License for more details.
  13.  
  14. You should have received a copy of the GNU Library General Public
  15. License along with the GNU C Library; see the file COPYING.LIB.  If
  16. not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  17. Cambridge, MA 02139, USA.  */
  18.  
  19. #ifndef    __GNU_STABS_H
  20.  
  21. #define    __GNU_STABS_H    1
  22.  
  23. #ifdef    HAVE_GNU_LD
  24.  
  25. /* Alias a function:
  26.        function_alias(creat, _creat, int, (file, mode),
  27.                DEFUN(creat, (file, mode),
  28.                      CONST char *file AND int mode))
  29.    Yes, this is very repetitive.  Nothing you can do about it, so shut up.  */
  30. #define    function_alias(name, _name, type, args, defun) \
  31.   symbol_alias (_name, name);
  32.  
  33. #define function_alias_void(name, _name, args, defun) \
  34.   symbol_alias (_name, name);
  35.  
  36. #ifdef NO_UNDERSCORES
  37. #define __SYMBOL_PREFIX
  38. #else
  39. #define __SYMBOL_PREFIX "_"
  40. #endif
  41.  
  42. /* Make references to ALIAS refer to SYMBOL.  */
  43. #define    symbol_alias(symbol, alias)    \
  44.   asm(".stabs \"" __SYMBOL_PREFIX #alias "\",11,0,0,0\n"\
  45.       ".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0")
  46.  
  47. /* Issue a warning message from the linker whenever SYMBOL is referenced.  */
  48. #define    warn_references(symbol, msg)    \
  49.   asm(".stabs \"" msg "\",30,0,0,0\n"    \
  50.       ".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0")
  51.  
  52. #define    stub_warning(name) \
  53.   warn_references(name, \
  54.           "warning: " #name " is not implemented and will always fail")
  55.  
  56. #define    text_set_element(set, symbol)    \
  57.   asm(".stabs \"" __SYMBOL_PREFIX #set "\",23,0,0," __SYMBOL_PREFIX #symbol)
  58. #define    data_set_element(set, symbol)    \
  59.   asm(".stabs \"" __SYMBOL_PREFIX #set "\",25,0,0," __SYMBOL_PREFIX #symbol)
  60. #define    bss_set_element(set, symbol)    \
  61.   asm(".stabs \"" __SYMBOL_PREFIX #set "\",27,0,0," __SYMBOL_PREFIX #symbol)
  62.  
  63. #else    /* No GNU stabs.  */
  64.  
  65. #define    function_alias(name, _name, type, args, defun) \
  66.   type defun { return _name args; }
  67.  
  68. #define function_alias_void(name, _name, args, defun) \
  69.   void defun { _name args; }
  70.  
  71. #endif    /* GNU stabs.  */
  72.  
  73. #endif    /* gnu-stabs.h  */
  74.